home *** CD-ROM | disk | FTP | other *** search
- /*============================== FramingView.h ==============================*/
- // Written by Dale Amon, copyright 1994 by Genesis Project, Ltd.
- // Version 0.8. All rights reserved.
- //
- // This notice may not be removed from this source code.
- //
- // This object is included in the MiscKit by permission from the author
- // and its use is governed by the MiscKit license, found in the file
- // "LICENSE.rtf" in the MiscKit distribution. Please refer to that file
- // for a list of all applicable permissions and restrictions.
- //
-
- /* Class that implements a frame and background fill.
-
- HISTORY
- 7-Feb-93 Dale Amon at GPL
- Created.
-
- */
-
- /* Justification types */
- #define MISC_FV_LL 0
- #define MISC_FV_UL 1
- #define MISC_FV_UR 2
- #define MISC_FV_LR 3
- #define MISC_FV_CENTER 4
-
- /* Resizing types */
- #define MISC_FV_NOFIT 0
- #define MISC_FV_BESTFIT 1
- #define MISC_FV_EXACTFIT 2
- #define MISC_FV_FILLFIT 3
-
- /* Outline types */
- #define MISC_FV_PLAIN 0
- #define MISC_FV_OUTLINE 1
-
- /* Widths of outlines */
- #define MISC_FV_PLAIN_WIDTH 0.0
- #define MISC_FV_OUTLINE_WIDTH 1.0
-
- /* Defaults */
- #define MISC_DEFAULT_BACKGROUND NX_LTGRAY
- #define MISC_DEFAULT_OUTLINE MISC_FV_OUTLINE
- #define MISC_DEFAULT_OUTLINE_WIDTH MISC_FV_OUTLINE_WIDTH
- #define MISC_DEFAULT_JUSTIFICATION MISC_FV_CENTER
- #define MISC_DEFAULT_RESIZING MISC_FV_BESTFIT
-
- #define MISC_FRAMINGVIEW_VERSION_ID 0.8
-
- #ifdef MiscFramingViewCompat
- #define FV_LL MISC_FV_LL
- #define FV_UL MISC_FV_UL
- #define FV_UR MISC_FV_UR
- #define FV_LR MISC_FV_LR
- #define FV_CENTER MISC_FV_CENTER
- #define FV_NOFIT MISC_FV_NOFIT
- #define FV_BESTFIT MISC_FV_BESTFIT
- #define FV_EXACTFIT MISC_FV_EXACTFIT
- #define FV_FILLFIT MISC_FV_FILLFIT
- #define FV_PLAIN MISC_FV_PLAIN
- #define FV_OUTLINE MISC_FV_OUTLINE
- #define FV_PLAIN_WIDTH MISC_FV_PLAIN_WIDTH
- #define FV_OUTLINE_WIDTH MISC_FV_OUTLINE_WIDTH
- #define DEFAULT_BACKGROUND MISC_DEFAULT_BACKGROUND
- #define DEFAULT_OUTLINE MISC_FV_OUTLINE
- #define DEFAULT_OUTLINE_WIDTH MISC_FV_OUTLINE_WIDTH
- #define DEFAULT_JUSTIFICATION MISC_FV_CENTER
- #define DEFAULT_RESIZING MISC_FV_BESTFIT
- #define FRAMINGVIEW_VERSION_ID MISC_FRAMINGVIEW_VERSION_ID
- #define FramingView MiscFramingView
- #endif MiscFramingViewCompat
-
- @interface MiscFramingView : MiscTargetActionView
- {
- float backgroundGray; /* Background gray */
- int justification; /* type of justification */
- int resizing; /* Type of resizing */
- int outline; /* Type of outline */
- id contentView; /* content view */
-
- float outlineWidth; /* Width of outline */
-
- BOOL _dirty; /* Content frame must update */
- }
-
- + initialize;
-
- - initFrame: (const NXRect *) theRect;
- - free;
-
- - setContentView: (View*) aView;
- - contentView;
-
- - drawSelf:(const NXRect *)rects :(int)rectCount;
-
- - (float)backgroundGray;
- - setBackgroundGray:(float)grayscale;
- - (int)outline;
- - setOutline:(int)type;
- - (int)justification;
- - setJustification:(int)type;
- - (int)resizing;
- - setResizing:(int)type;
-
- /* Disallowed */
- - addSubview:aView;
- - addSubview:aView :(int)place relativeTo:otherView;
- - replaceSubview:oldView with:newView;
-
- /* Set dirty bit before doing them */
- - rotateTo:(NXCoord)angle;
- - sizeTo:(NXCoord)width :(NXCoord)height;
- - descendantFrameChanged:sender;
-
- - write: (NXTypedStream *) stream;
- - read: (NXTypedStream *) stream;
- - awake;
-
- @end
-